package com.dycx.api.controller.app.cms;

import com.dycx.cms.service.AdService;
import com.dycx.cms.vo.AdVO;
import com.dycx.common.RestResponse;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping(value = "/app/cms/ad")
@AllArgsConstructor
public class AdApiController {

    private AdService adService;

    /**
     * 获取广告
     **/
    @GetMapping("getList")
    public RestResponse<List<AdVO>> getList(Integer adTypeId) {
        return RestResponse.success(adService.getAllList(adTypeId));
    }
}
